<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%-- <c:forEach items="${cs}" var="c"> --%>
<%-- 	<a href="${pageContext.request.contextPath}/servlet/ClientServlet?op=showCategoryPageRecords&categoryId=${c.id}">${c.name}</a> --%>
<%-- </c:forEach> --%>
<html><head>
<style type="text/css">
body,table{
    font-size:15px;
}
table{
/*     table-layout:fixed; */
    empty-cells:show; 
    border-collapse: collapse;
    background-color: silver;
/*     margin:0 auto; */
}
td{
    height:22px;
}
.unsent{
	background-color: #EEAD0E;
}
.sent{
	background-color: #32CD32;
}
</style>

<script type="text/javascript" src="./common/js/jquery-2.1.1.js"></script>
<script type="text/javascript" src="./common/js/timer.js"></script>
</head>
<body>
<div style="float:right"><p id="msg" align="left"></p></div>
<div><h1>今天是 <fmt:formatDate value="<%=new Date() %>" pattern="yyyy年MM月dd日" /></h1></div>
<br/>
<br/>
	<div style="float:left"><a href="addExpressUI.action">新增数据</a>&nbsp;|&nbsp;<a href="historyExpress.action">历史数据</a></div>
<br/>
<br/>
    <table width="1200" border="1" style="border-color:gray">
    	<c:if test="${!empty page.records}">
    		<thead >
    			<tr>
    				<th>编号</th>
    				<th>姓名</th>
    				<th>地址</th>
    				<th>备用地址</th>
    				<th>电话</th>
    				<th>备用电话</th>
    				<th>寄出时间</th>
    				<th>有效期限</th>
    				<th>快递单号</th>
    				<th>备注</th>
    				<th>状态</th>
    				<th>操作</th>
    			</tr>
    		</thead>
    	</c:if>
    	<c:forEach items="${page.records}" var="b">
    	<tr class="${b.status=='0'?'unsent':'sent'}">
    		<td>${b.expressNo}</td>
    		<td>${b.name}</td>
    		<td>${b.address}</td>
    		<td>${b.address2}</td>
    		<td>${b.telephone}</td>
    		<td>${b.telephone2}</td>
    		<td nowrap="nowrap"><fmt:formatDate value="${b.sendDate}" pattern="yyyy年MM月dd日" /></td>
    		<td>${b.validity}</td>
    		<td>${b.expressageNumber}</td>
    		<td>${b.info}</td>
    		<td>${b.status=='0'?'未寄':'已寄'}</td>
    		<td><a href="deleteExpress.action?expressNo='${b.expressNo}'">删除</a>/<a href="updateExpressUI.action?expressNo='${b.expressNo}'">更新</a></td>
    	</tr>
    	</c:forEach>
    </table>
    <br/>
           第${page.currentPageNum }页/共${page.totalPage }页&nbsp;&nbsp;
    <a href="${pageContext.request.contextPath}/${page.url}?num=${page.currentPageNum-1<1?1:page.currentPageNum-1}">上一页</a>
    <a href="${pageContext.request.contextPath}/${page.url}?num=${page.currentPageNum+1>page.totalPage?page.totalPage:page.currentPageNum+1}">下一页</a>
  </body>
</html>
